package com.adcc.foc.IDao;

import com.adcc.foc.domain.Organization;

import java.util.List;

/**
 * Created by houxy on 2016/8/3.
 *
 * @author houxy
 * OrgMapper.xml的Dao接口
 */
public interface OrgMapper {
    //查询所有组织树节点
    List<Organization> findAll();

    //修改节点名称
    int alterName(Organization org);

    //查找同一父节点下是否有重复名称
    int findSame(String deptName, String pid);

    //新增节点
    int newNode(Organization org);

    //删除选中节点及其子节点
    void deleteNodes(String fid);

    //转移节点
    int moveNode(Organization org);

    //根据用户权限查询对应的组织
    List<Organization> findOrgsByOrgId(String OrgId);

    //查询根节点
    List<Organization> findRoot(String orgId);

    //根据id查询部门
    Organization findByOrgId(String id);

    //根据id查重
    Organization findSameByOrgId(String sid, String pid);
}
